<html>
<head><meta charset="utf-8"><title>cargo test issue · t-cargo · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/index.html">t-cargo</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html">cargo test issue</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="220288419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220288419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220288419">(Dec 17 2020 at 19:15)</a>:</h4>
<p>Hi all! I'm running in an issue where <code>cargo test</code> stops without pointing to actual failing test. Is there a way I can debug it? The output looks like this:</p>
<p>running n tests<br>
test some_test_name ... ok<br>
test another_test_name ... ok<br>
error: test failed, to rerun pass 'lib'</p>
<p>Is it a good place to ask such a question? Or should I go straight to github and file an issue there? Sorry If I'm asking in a wrong place, my first time using Zulip, I used rust discord server before. Not really getting how to navigate through conversations here yet</p>
<p>Some more info on the issue. After running <code>cargo test -- --nocapture</code> the ouput contains the following text:<br>
the test returned a termination value with a non-zero status code (1) which indicates a failure', /home/uname/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test/src/lib.rs:192:5<br>
note: run with <code>RUST_BACKTRACE=1</code> environment variable to display a backtrace<br>
error: test failed, to rerun pass '--lib'</p>



<a name="220288430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220288430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220288430">(Dec 17 2020 at 19:15)</a>:</h4>
<p>Hi all! I'm running in an issue where <code>cargo test</code> stops without pointing to actual failing test. Is there a way I can debug it? The output looks like this:</p>
<p>running n tests<br>
test some_test_name ... ok<br>
test another_test_name ... ok<br>
error: test failed, to rerun pass 'lib'</p>
<p>Is it a good place to ask such a question? Or should I go straight to github and file an issue there? Sorry If I'm asking in a wrong place, my first time using Zulip, I used rust discord server before. Not really getting how to navigate through conversations here yet</p>
<p>Some more info on the issue. After running <code>cargo test -- --nocapture</code> the ouput contains the following text:<br>
the test returned a termination value with a non-zero status code (1) which indicates a failure', /home/uname/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/test/src/lib.rs:192:5<br>
note: run with <code>RUST_BACKTRACE=1</code> environment variable to display a backtrace<br>
error: test failed, to rerun pass '--lib'</p>



<a name="220288597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220288597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220288597">(Dec 17 2020 at 19:16)</a>:</h4>
<p>This is a good place!</p>



<a name="220288878"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220288878" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220288878">(Dec 17 2020 at 19:19)</a>:</h4>
<p>Do you have a some why for us to reproduce?</p>



<a name="220291691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220291691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220291691">(Dec 17 2020 at 19:40)</a>:</h4>
<p>Not yet, I need help making a small example which reproduces the behavior, but I don't really know where to start from. I feel like hitting the wall, never saw the tests behaving this way</p>



<a name="220294565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220294565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220294565">(Dec 17 2020 at 20:03)</a>:</h4>
<p>Apparently, the line <code>rustlib/src/rust/library/test/src/lib.rs:192:5</code> appears when <code>Err</code> is returned from the test. But what breaks the report is still a question. How do you usually explore such issues? Maybe there are some flags for cargo or specific tools?</p>



<a name="220294648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220294648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220294648">(Dec 17 2020 at 20:04)</a>:</h4>
<p>Apparently, the line <code>rustlib/src/rust/library/test/src/lib.rs:192:5</code> appears when <code>Err</code> is returned from the test. But what breaks the report is still a question. How do you usually explore such issues? Maybe there are some flags for cargo or specific tools?</p>



<a name="220297404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220297404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eh2406 <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220297404">(Dec 17 2020 at 20:27)</a>:</h4>
<p><a href="https://doc.crates.io/contrib/architecture/console.html?highlight=Cargo_l#debug-logging"><code>CARGO_LOG</code></a> can be set to get lots of output, but I don't know what part will be relevant to filter to.</p>



<a name="220299044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220299044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220299044">(Dec 17 2020 at 20:39)</a>:</h4>
<p><span class="user-mention" data-user-id="372404">@ibaryshnikov</span> maybe try running each test separately and see which one fails?</p>



<a name="220362194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220362194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220362194">(Dec 18 2020 at 11:41)</a>:</h4>
<p>Thanks, I'll try CARGO_LOG and come back later. Running tests one by one or filtering by common keyword indeed helps to find the falind test. But I want to find the reason.</p>



<a name="220444507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/246057-t-cargo/topic/cargo%20test%20issue/near/220444507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> ibaryshnikov <a href="https://rust-lang.github.io/zulip_archive/stream/246057-t-cargo/topic/cargo.20test.20issue.html#220444507">(Dec 19 2020 at 00:48)</a>:</h4>
<p>Found <code>process.exit(1)</code> in one of the tests, looks like a cause</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>